Strict

Import agfx

Class TTriangle Extends TPrimitive
	
	Field type:Int = -1
	
	Method New()
		Super.New(PRIMITIVE_TYPE_TRIANGLE)
	End Method
	
	
	Method Create:Void(A:TVector2,B:TVector2,C:TVector2)
		Self.points.Add(C)
		Self.points.Add(B)
		Self.points.Add(A)
		Self.Update()
	End Method
	
	Method Update:Void(recalc_center:Bool=True,recalc_bbox:Bool=True,recalc_edge:Bool=True)
		
		If recalc_edge Then Self.CalcEdges()
		If recalc_center Then Self.CalcCenter()
		If recalc_bbox Then Self.CalcBoundingBox()
		
	End Method
	
End Class